const PARSED = [
    {
        query: '&[',
        elems: [],
        foundElems: 0,
        userQuery: '&[',
        returned: [],
        error: 'Unclosed `[`',
    },
    {
        query: '[&',
        elems: [],
        foundElems: 0,
        userQuery: '[&',
        returned: [],
        error: 'Unclosed `[`',
    },
    {
        query: '&&&D, []',
        elems: [
            {
                name: "reference",
                fullPath: ["reference"],
                pathWithoutLast: [],
                pathLast: "reference",
                generics: [
                    {
                        name: "reference",
                        fullPath: ["reference"],
                        pathWithoutLast: [],
                        pathLast: "reference",
                        generics: [
                            {
                                name: "reference",
                                fullPath: ["reference"],
                                pathWithoutLast: [],
                                pathLast: "reference",
                                generics: [
                                    {
                                        name: "D",
                                        fullPath: ["d"],
                                        pathWithoutLast: [],
                                        pathLast: "d",
                                        generics: [],
                                        typeFilter: null,
                                    },
                                ],
                                typeFilter: "primitive",
                            },
                        ],
                        typeFilter: "primitive",
                    },
                ],
                typeFilter: "primitive",
            },
            {
                name: "[]",
                fullPath: ["[]"],
                pathWithoutLast: [],
                pathLast: "[]",
                generics: [],
                typeFilter: "primitive",
            },
        ],
        foundElems: 2,
        userQuery: '&&&D, []',
        returned: [],
        error: null,
    },
    {
        query: '&&&[D]',
        elems: [
            {
                name: "reference",
                fullPath: ["reference"],
                pathWithoutLast: [],
                pathLast: "reference",
                generics: [
                    {
                        name: "reference",
                        fullPath: ["reference"],
                        pathWithoutLast: [],
                        pathLast: "reference",
                        generics: [
                            {
                                name: "reference",
                                fullPath: ["reference"],
                                pathWithoutLast: [],
                                pathLast: "reference",
                                generics: [
                                    {
                                        name: "[]",
                                        fullPath: ["[]"],
                                        pathWithoutLast: [],
                                        pathLast: "[]",
                                        generics: [
                                            {
                                                name: "D",
                                                fullPath: ["d"],
                                                pathWithoutLast: [],
                                                pathLast: "d",
                                                generics: [],
                                                typeFilter: null,
                                            },
                                        ],
                                        typeFilter: "primitive",
                                    },
                                ],
                                typeFilter: "primitive",
                            },
                        ],
                        typeFilter: "primitive",
                    },
                ],
                typeFilter: "primitive",
            },
        ],
        foundElems: 1,
        userQuery: '&&&[D]',
        returned: [],
        error: null,
    },
    {
        query: '&',
        elems: [
            {
                name: "reference",
                fullPath: ["reference"],
                pathWithoutLast: [],
                pathLast: "reference",
                generics: [],
                typeFilter: "primitive",
            },
        ],
        foundElems: 1,
        userQuery: '&',
        returned: [],
        error: null,
    },
    {
        query: '&mut',
        elems: [
            {
                name: "reference",
                fullPath: ["reference"],
                pathWithoutLast: [],
                pathLast: "reference",
                generics: [
                    {
                        name: "mut",
                        fullPath: ["mut"],
                        pathWithoutLast: [],
                        pathLast: "mut",
                        generics: [],
                        typeFilter: "keyword",
                    },
                ],
                typeFilter: "primitive",
            },
        ],
        foundElems: 1,
        userQuery: '&mut',
        returned: [],
        error: null,
    },
    {
        query: '&,u8',
        elems: [
            {
                name: "reference",
                fullPath: ["reference"],
                pathWithoutLast: [],
                pathLast: "reference",
                generics: [],
                typeFilter: "primitive",
            },
            {
                name: "u8",
                fullPath: ["u8"],
                pathWithoutLast: [],
                pathLast: "u8",
                generics: [],
                typeFilter: null,
            },
        ],
        foundElems: 2,
        userQuery: "&,u8",
        returned: [],
        error: null,
    },
    {
        query: '&mut,u8',
        elems: [
            {
                name: "reference",
                fullPath: ["reference"],
                pathWithoutLast: [],
                pathLast: "reference",
                generics: [
                    {
                        name: "mut",
                        fullPath: ["mut"],
                        pathWithoutLast: [],
                        pathLast: "mut",
                        generics: [],
                        typeFilter: "keyword",
                    },
                ],
                typeFilter: "primitive",
            },
            {
                name: "u8",
                fullPath: ["u8"],
                pathWithoutLast: [],
                pathLast: "u8",
                generics: [],
                typeFilter: null,
            },
        ],
        foundElems: 2,
        userQuery: "&mut,u8",
        returned: [],
        error: null,
    },
    {
        query: '&u8',
        elems: [
            {
                name: "reference",
                fullPath: ["reference"],
                pathWithoutLast: [],
                pathLast: "reference",
                generics: [
                    {
                        name: "u8",
                        fullPath: ["u8"],
                        pathWithoutLast: [],
                        pathLast: "u8",
                        generics: [],
                        typeFilter: null,
                    },
                ],
                typeFilter: "primitive",
            },
        ],
        foundElems: 1,
        userQuery: "&u8",
        returned: [],
        error: null,
    },
    {
        query: '&u8<u8>',
        elems: [
            {
                name: "reference",
                fullPath: ["reference"],
                pathWithoutLast: [],
                pathLast: "reference",
                generics: [
                    {
                        name: "u8",
                        fullPath: ["u8"],
                        pathWithoutLast: [],
                        pathLast: "u8",
                        generics: [
                            {
                                name: "u8",
                                fullPath: ["u8"],
                                pathWithoutLast: [],
                                pathLast: "u8",
                                generics: [],
                                typeFilter: null,
                            },
                        ],
                        typeFilter: null,
                    },
                ],
                typeFilter: "primitive",
            },
        ],
        foundElems: 1,
        userQuery: "&u8<u8>",
        returned: [],
        error: null,
    },
    {
        query: 'u8<&u8>',
        elems: [
            {
                name: "u8",
                fullPath: ["u8"],
                pathWithoutLast: [],
                pathLast: "u8",
                generics: [
                    {
                        name: "reference",
                        fullPath: ["reference"],
                        pathWithoutLast: [],
                        pathLast: "reference",
                        generics: [
                            {
                                name: "u8",
                                fullPath: ["u8"],
                                pathWithoutLast: [],
                                pathLast: "u8",
                                generics: [],
                                typeFilter: null,
                            },
                        ],
                        typeFilter: "primitive",
                    },
                ],
                typeFilter: null,
            },
        ],
        foundElems: 1,
        userQuery: "u8<&u8>",
        returned: [],
        error: null,
    },
    {
        query: 'u8<&u8, u8>',
        elems: [
            {
                name: "u8",
                fullPath: ["u8"],
                pathWithoutLast: [],
                pathLast: "u8",
                generics: [
                    {
                        name: "reference",
                        fullPath: ["reference"],
                        pathWithoutLast: [],
                        pathLast: "reference",
                        generics: [
                            {
                                name: "u8",
                                fullPath: ["u8"],
                                pathWithoutLast: [],
                                pathLast: "u8",
                                generics: [],
                                typeFilter: null,
                            },
                        ],
                        typeFilter: "primitive",
                    },
                    {
                        name: "u8",
                        fullPath: ["u8"],
                        pathWithoutLast: [],
                        pathLast: "u8",
                        generics: [],
                        typeFilter: null,
                    },
                ],
                typeFilter: null,
            },
        ],
        foundElems: 1,
        userQuery: "u8<&u8, u8>",
        returned: [],
        error: null,
    },
    {
        query: 'u8<&u8>',
        elems: [
            {
                name: "u8",
                fullPath: ["u8"],
                pathWithoutLast: [],
                pathLast: "u8",
                generics: [
                    {
                        name: "reference",
                        fullPath: ["reference"],
                        pathWithoutLast: [],
                        pathLast: "reference",
                        generics: [
                            {
                                name: "u8",
                                fullPath: ["u8"],
                                pathWithoutLast: [],
                                pathLast: "u8",
                                generics: [],
                                typeFilter: null,
                            },
                        ],
                        typeFilter: "primitive",
                    },
                ],
                typeFilter: null,
            },
        ],
        foundElems: 1,
        userQuery: "u8<&u8>",
        returned: [],
        error: null,
    },
    {
        query: 'u8<&mut u8, u8>',
        elems: [
            {
                name: "u8",
                fullPath: ["u8"],
                pathWithoutLast: [],
                pathLast: "u8",
                generics: [
                    {
                        name: "reference",
                        fullPath: ["reference"],
                        pathWithoutLast: [],
                        pathLast: "reference",
                        generics: [
                            {
                                name: "mut",
                                fullPath: ["mut"],
                                pathWithoutLast: [],
                                pathLast: "mut",
                                generics: [],
                                typeFilter: "keyword",
                            },
                            {
                                name: "u8",
                                fullPath: ["u8"],
                                pathWithoutLast: [],
                                pathLast: "u8",
                                generics: [],
                                typeFilter: null,
                            },
                        ],
                        typeFilter: "primitive",
                    },
                    {
                        name: "u8",
                        fullPath: ["u8"],
                        pathWithoutLast: [],
                        pathLast: "u8",
                        generics: [],
                        typeFilter: null,
                    },
                ],
                typeFilter: null,
            },
        ],
        foundElems: 1,
        userQuery: "u8<&mut u8, u8>",
        returned: [],
        error: null,
    },
    {
        query: 'primitive:&u8',
        elems: [
            {
                name: "reference",
                fullPath: ["reference"],
                pathWithoutLast: [],
                pathLast: "reference",
                generics: [
                    {
                        name: "u8",
                        fullPath: ["u8"],
                        pathWithoutLast: [],
                        pathLast: "u8",
                        generics: [],
                        typeFilter: null,
                    },
                ],
                typeFilter: "primitive",
            },
        ],
        foundElems: 1,
        userQuery: "primitive:&u8",
        returned: [],
        error: null,
    },
    {
        query: 'macro:&u8',
        elems: [],
        foundElems: 0,
        userQuery: "macro:&u8",
        returned: [],
        error: "Invalid search type: primitive `&` and `macro` both specified",
    },
    {
        query: '&macro:u8',
        elems: [
            {
                name: "reference",
                fullPath: ["reference"],
                pathWithoutLast: [],
                pathLast: "reference",
                generics: [
                    {
                        name: "u8",
                        fullPath: ["u8"],
                        pathWithoutLast: [],
                        pathLast: "u8",
                        generics: [],
                        typeFilter: "macro",
                    },
                ],
                typeFilter: "primitive",
            },
        ],
        foundElems: 1,
        userQuery: "&macro:u8",
        returned: [],
        error: null,
    },
];
